package com.hnevc.xiaoming.activity;


import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

import androidx.annotation.Nullable;

/**
 * [服务SerVice]
 * 生命周期
 */
public class MyService extends Service {
    @Override
    public void onCreate() {
        super.onCreate();
        Log.i("MyService", "创建服务，执行 onCreate 方法 ");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.i("MyService", "开启服务，执行 onStartCommand方法！");


        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.i("MyService", "关闭服务，执行 onDestroy方法");
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;

    }
}
